


class Strategy:
    def __init__(self) -> None:
        self.condition_list = []
        self.operation = {
            "stock_code":None,
            "operation_type":None,
            "amount":None
        }
        return
    
    def addCondition(self,attribute_source:str,attribute_name:str,calculate_type:str,variation:float,offdays:int=1):
        temp_condition = {}
        temp_condition["attribute_source"] = attribute_source
        temp_condition["attribute_name"] = attribute_name
        temp_condition["calculate_type"] = calculate_type
        temp_condition["variation"] = variation
        temp_condition["offdays"] = offdays
        self.condition_list.append(temp_condition)
    
    def setOperation(self,stock_code:str,operation_type:str,amount:int)->None:
        self.operation["stock_code"] = stock_code
        self.operation["operation_type"] = operation_type
        self.operation["amount"] = amount
    
    